export interface User {
  id?: string | number;
  username: string;
  name?: string;
  email?: string;
  mobile?: string;
  role?: string;
  avatar?: string;
  status?: 'active' | 'inactive' | 'banned';
  createTime?: string;
  updateTime?: string;
  lastLoginAt?: string;
  createdAt?: string;
  updatedAt?: string;
}

export interface UserProfile {
  id: string;
  username: string;
  email: string;
  name: string;
  mobile?: string;
  avatar?: string;
  role: string;
  status: 'active' | 'inactive' | 'banned';
  department?: string;
  position?: string;
  bio?: string;
  location?: string;
  website?: string;
  timezone?: string;
  language?: string;
  theme?: 'light' | 'dark' | 'auto';
  notifications: {
    email: boolean;
    push: boolean;
    sms: boolean;
  };
  lastLoginAt: string;
  createdAt: string;
  updatedAt: string;
  hasUnreadNotifications?: boolean;
  twoFactorEnabled?: boolean;
  emailVerified?: boolean;
  lastLoginSecure?: boolean;
}

export interface LoginRequest {
  username: string;
  password: string;
}

export interface LoginResponse {
  token: string;
  user: User;
}

export interface LoginResponseData {
  accessToken: string;
  refreshToken: string;
  accessTokenExpire: string;
  refreshTokenExpire: string;
}

export interface RefreshTokenResponse {
  accessToken: string;
  refreshToken: string;
  accessTokenExpire: string;
  refreshTokenExpire: string;
}

export interface PaginationParams {
  page: number;
  pageSize: number;
  total?: number;
}

export interface ApiResponse<T> {
  code: number;
  message: string;
  data: T;
}

export interface MenuItem {
  key: string;
  label: string;
  icon?: React.ReactNode;
  children?: MenuItem[];
  path?: string;
  permission?: string;
}

export interface SystemConfig {
  siteName: string;
  logo: string;
  favicon: string;
  theme: 'light' | 'dark';
  language: string;
}

// 扩展Menu类型以支持树形结构
import type { Menu as BaseMenu } from '@/api/system';

export interface MenuWithChildren extends BaseMenu {
  children?: MenuWithChildren[];
}